<?php
/* ----------------------------------------------------------
--               JacoCMS by Jaco Ruit                      --
-------------------------------------------------------------
--     JacoCMS is Open Source and is lincenced under       --
--             GNU General Public Licence v3               --
--          http://www.gnu.org/copyleft/gpl.html           --
-------------------------------------------------------------
--       Please don't remove any text from the footers.    --
-------------------------------------------------------------
-- Credits:   * Jaco Ruit          ~     Scripts,MySQL     --     
-----------------------------------------------------------*/

include '../includes/user.class.php';

#Installation Script JacoCMS
if(!isset($_GET['step']))
{
	echo "<p>Error, no installation step found.</p>";
}
else
{
	$stepno = $_GET['step'];
	if ($stepno == 1)
	{
?>

<html>
	<head>
		<title>JacoCMS - Installer Step 1</title>
		<link href="style.css" rel="stylesheet" type="text/css" /> 
	</head>
	<body>
	<div id="panel">
	<center><img src="../style/default/logo.png" /></center>
		<h3>JacoCMS Installer ~ Step 1</h3>
		<p>Thanks for choosing for JacoCMS</p><br />
		<p>Please CHMOD /templates_c/ and /admin/templates_c/ and /install/config.php to 777</p><br />
		<p>Don't know how to use CHMOD? Click <a href="http://www.phpjunkyard.com/tutorials/ftp-chmod-tutorial.php" target="_blank">here</a> for a tutorial (scroll down)</p><br /><br /><br />
		<p>Done? Go to the <a href="install.php?step=2">next</a> step.</p>
	</div>
	</body>
</html>

<?php
	}
	else if($stepno == 2)
	{
?>
<html>
	<head>
		<title>JacoCMS - Installer Step 2</title>
		<link href="style.css" rel="stylesheet" type="text/css" /> 
	</head>
	<body>
	<div id="panel">
		<center><img src="../style/default/logo.png" /></center>
		<h3>JacoCMS Installer ~ Step 2</h3>
		<p>MySQL Database Connection</p><br />
		<p>Please fill in your database details.</p><br />
		<form action="testdbconnection.php" method="post" name="mysqlcreds">
			<p>MySQL Database Server:</p><input type="text" name="mysqlhost" value="localhost" /><br />
			<p>MySQL Database User:</p><input type="text" name="mysqluser" /><br />
			<p>MySQL Database Password:</p><input type="password" name="mysqlpw" /><br />
			<p>MySQL Database Name:</p><input type="text" name="mysqldbname" /><br />
			<input name="submit" type="submit" value="Done" />
		</form>
	</div>
	</body>
</html>

<?php
	}
	else if ($stepno == 3)
	{
?>

<html>
	<head>
		<title>JacoCMS - Installer Step 3</title>
		<link href="style.css" rel="stylesheet" type="text/css" /> 
	</head>
	<body>
	<div id="panel">
		<center><img src="../style/default/logo.png" /></center>
		<h3>JacoCMS Installer ~ Step 3</h3>
		<p>Website Configuration</p><br />
		<p>Please fill in the form.</p><br />
		<form action="queries.php" method="post" name="websiteconfig">
			<p>Website Name:</p><input type="text" name="websitename" /><br />
			<p>Website URL:</p><input type="text" name="websiteurl" /><br />
			<p>No http:// prefix ~ No '/' at the end of the URL!</p><br />
			<input name="submit" type="submit" value="Done" />
		</form>
	</div>
	</body>
</html>

<?php
	}
	else if ($stepno == 4)
	{
?>

<html>
	<head>
		<title>JacoCMS - Installer Step 4</title>
		<link href="style.css" rel="stylesheet" type="text/css" /> 
	</head>
	<body>
	<div id="panel">
		<center><img src="../style/default/logo.png" /></center>
		<h3>JacoCMS Installer ~ Step 4</h3>
		<p>Create Admin Account</p><br />
		<p>Please fill in the form.</p><br />
		<form action="newadmin.php" method="post" name="newadmin">
			<p>Account Name:</p><input type="text" name="adminname" /><br />
			<p>Account Password:</p><input type="password" name="adminpw" /><br />
			<p>Account Email:</p><input type="text" name="adminemail" /><br />
			<input name="submit" type="submit" value="Done" />
		</form>
	</div>
	</body>
</html>

<?php
	}
	else
	{
		echo "<p>Wrong step number.</p>";
	}
}
?>
		

